package com.leyou.auth.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by IntelliJ IDEA.
 *
 * @author: wangzibeng
 * Date: 2019/5/16 0016
 * Time: 15:20
 */

@FeignClient("auth-server")
public interface AuthClient {
    /**
     * 微服务认证并申请令牌
     *
     * @param id     微服务id
     * @param secret 密码
     * @return token
     */
    @GetMapping("authentication")
    String authenticate(@RequestParam("id") Long id, @RequestParam("secret") String secret);
}
